package(default_visibility = ["//:__subpackages__"])

licenses(["notice"])

cc_library(
    name = "streaming_prf",
    hdrs = ["streaming_prf.h"],
    include_prefix = "tink/subtle/prf",
    deps = [
        "//:input_stream",
        "@com_google_absl//absl/strings",
    ],
)

cc_library(
    name = "hkdf_streaming_prf",
    srcs = ["hkdf_streaming_prf.cc"],
    hdrs = ["hkdf_streaming_prf.h"],
    include_prefix = "tink/subtle/prf",
    deps = [
        ":streaming_prf",
        "//internal:fips_utils",
        "//internal:md_util",
        "//internal:ssl_unique_ptr",
        "//subtle",
        "//subtle:subtle_util",
        "//util:secret_data",
        "//util:status",
        "//util:statusor",
        "@boringssl//:crypto",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
    ],
)

cc_library(
    name = "streaming_prf_wrapper",
    srcs = ["streaming_prf_wrapper.cc"],
    hdrs = ["streaming_prf_wrapper.h"],
    include_prefix = "tink/subtle/prf",
    deps = [
        ":streaming_prf",
        "//:primitive_set",
        "//:primitive_wrapper",
        "//util:statusor",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
    ],
)

cc_library(
    name = "prf_set_util",
    srcs = ["prf_set_util.cc"],
    hdrs = ["prf_set_util.h"],
    include_prefix = "tink/subtle/prf",
    deps = [
        ":streaming_prf",
        "//prf:prf_set",
        "//subtle/mac:stateful_mac",
        "//util:input_stream_util",
        "//util:status",
        "//util:statusor",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
    ],
)

cc_test(
    name = "hkdf_streaming_prf_test",
    srcs = ["hkdf_streaming_prf_test.cc"],
    tags = ["fips"],
    deps = [
        ":hkdf_streaming_prf",
        "//config:tink_fips",
        "//subtle",
        "//util:input_stream_util",
        "//util:secret_data",
        "//util:test_matchers",
        "//util:test_util",
        "@com_google_absl//absl/status",
        "@com_google_googletest//:gtest_main",
    ],
)

cc_test(
    name = "streaming_prf_wrapper_test",
    srcs = ["streaming_prf_wrapper_test.cc"],
    deps = [
        ":streaming_prf_wrapper",
        "//proto:tink_cc_proto",
        "//util:input_stream_util",
        "//util:istream_input_stream",
        "//util:test_matchers",
        "//util:test_util",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@com_google_googletest//:gtest_main",
    ],
)

cc_test(
    name = "prf_set_util_test",
    srcs = ["prf_set_util_test.cc"],
    deps = [
        ":prf_set_util",
        ":streaming_prf",
        "//:input_stream",
        "//util:istream_input_stream",
        "//util:status",
        "//util:test_matchers",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@com_google_googletest//:gtest_main",
    ],
)
